<%@ page pageEncoding="utf-8"%> 
<%@page import="com.course.db.*"%>

<%  
	String path = request.getContextPath();  
	String basePath = request.getScheme()+"://"+request.getServerName()+
		(request.getServerPort() == 80 ? "" : (":"+request.getServerPort())) +path+"/";  
	String   userName   =   (String)session.getAttribute("userName");
	String   userType   =   (String)session.getAttribute("userType");
	String 	 menus=(String)session.getAttribute("menus");
	CourseBasic course = (CourseBasic)session.getAttribute("CourseEdit");
	//session.removeAttribute("CheckCourse");
%>
 
<script type="text/javascript">
	var base_path = "<%=basePath%>";
	var user_name="<%=userName%>";
	var user_type="<%=userType%>";
	var menus="<%=menus%>";

	function closebox(){ 
		   this.parent.Popup.prototype.reset_m(); //会刷新父页面
	} 
</script>
<base href="<%=basePath%>">
<%
	request.setAttribute("page_title","温岭选课系统-上传教师信息");
%>
<link rel="stylesheet" href="css/text.css" />
<link rel="stylesheet" href="css/reset.css" />
<link rel="stylesheet" href="css/style.css" />
<style>
	table{
		margin:0;
		padding:0;
		border-collapse:collapse;
		border:0;
		cellpadding:0;
		cellspacing:0; 
		width:100%;
		//height:100%;
	}
	
	td{
		text-align:center;
		vertical-align:middle;
		line-height:30px;
		font-size:13px;
		border-collapse:collapse;
		border:1px solid black;
		margin:0;
		padding:0;
		
	}

	.tdLeft{
		align:left;
		text-align:left;
		padding-left:20px;
		
	}
</style>

<script type='text/javascript'>
	function submitfile()
	{
	   document.form1.submit();
	   document.form1.Reset.disabled=true;
	   document.getElementById("ajaxResult").innerHTML="<font color=\"red\">数据提交中 </font><img src='./images/loading.gif'/>";
	}  
</script>
	
<div style="width:100%; margin:1px;text-align:center;margin-top:10px;margin-bottom:50px;">
 	<p style="border:0;font-size:14px;padding-bottom:0;">
  		<b>导入教师信息</b>
	</p>
	
		<form action="./upload?type=teacher" name="form1" method="post"  enctype="multipart/form-data">
		<table style="border:1px solid gray;margin-left:0%;width:80%;">
			<tr>
				<td>教师信息</td><td align=left><input type="file" size=30 name="file1" /></td>
				
			</tr>
		</table>
		<div id="btn" style="width:100%;align:right">
			<input type="reset" name="Reset" value="重置"  style="margin-left:58%;"/>&nbsp;&nbsp;&nbsp;&nbsp;
      		<input type="button" value="提交" onclick="javascript:{this.disabled=true;submitfile();}">
		</div>
	</form>
	 <div id="ajaxResult" style="margin-top:20px;">
				<!-- <img src='./images/loading.gif'/>	  -->
	</div>

</div>